from dataclasses import dataclass
import os


cujo_bin='/home/passwd123/XiaoweiGuo/vscode/code-security/third_party/lexical-jsdetector/src/main.py'

def train_cujo(good_dir,bad_dir,model_file):
    cmd=f'python {cujo_bin} -ti {good_dir} {bad_dir} -tc benign malicious --save_model {model_file}'
    return os.system(cmd)

def classify(model_file,good_dir,bad_dir):
    cmd=f'python {cujo_bin} -ai {good_dir} {bad_dir} -ac benign malicious --load_model {model_file}'
    return os.system(cmd)

